package com.mrx.pvzcommunity.util;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;

@Component
public class DocRunner implements ApplicationRunner {

    @Value("${server.port}")
    private Integer port;

    @Override
    public void run(ApplicationArguments args) {
        System.out.println("*****************************");
        System.out.println("服务器启动完毕, 在浏览器地址栏输入: ");
        System.out.println("http://localhost:" + port + "/doc.html");
        System.out.println("访问 API 文档");
        System.out.println("**************************** ");
    }

}
